import request from '@/utils/request';

export interface TrademarkModel{
  id?:number,
  tmName:string,
  logoUrl:string
}

export interface TrademarkPageModel {
  records: TrademarkModel[],
  total: number,
  size: number,
  current: number,
  searchCount: boolean,
  pages: number
}

export default {
  getPage(page: number, limit: number) {
    return request.get<any, TrademarkPageModel>(`/admin/product/baseTrademark/${page}/${limit}`)
  },
  save(tmForm: TrademarkModel) {
    return request.post<any, null>(`/admin/product/baseTrademark/save`, tmForm)
  },
  update(tmForm: TrademarkModel) {
    return request.put<any, null>(`/admin/product/baseTrademark/update`, tmForm)
  },
  delete(id: number) {
    return request.delete<any, null>(`/admin/product/baseTrademark/remove/${id}`)
  },
  //品牌下拉
  getTrademarkList(){
    return request.get<any,TrademarkModel[]>(`/admin/product/baseTrademark/getTrademarkList`)
  }
}